<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>显示请假单信息</title>
	<script type="text/javascript">

    </script>
    <style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}
.STYLE1 {
	color: #e1e2e3;
	font-size: 12px;
}
.STYLE6 {color: #000000; font-size: 12; }
.STYLE10 {color: #000000; font-size: 12px; }
.STYLE19 {
	color: #344b50;
	font-size: 12px;
}
.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}
.STYLE22 {
	font-size: 12px;
	color: #295568;
}
-->
</style>
		<SCRIPT type="text/javascript">
				function goToPage(currentPage)
				{
				    //var goodName =$("#search_txt_goodName").val();
				    //var states = $("#search_drl_states").val();
				     
					location.href = "toListAbsenceOrder.action?currpage="+currentPage;
				}
		</SCRIPT>
</head>
<body>
	<div>
		<table width="100%" border="1" cellspacing="0"
				style="text-align: left">
				<tbody>
					<tr>
						<td width="32" height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							序号
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							请假人
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							请假标题
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							请假类型
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							起始日期
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							结束日期
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							总计小时
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							状态
						</td>
						<td height="30" align="center" bgcolor="d3eaef" class="STYLE10">
							查看详细
						</td>
						
					</tr>
				</tbody>
				<tbody>
					<s:if test="absenceOrderList != null && absenceOrderList.size != 0">
					<s:iterator value="absenceOrderList" var="item" status="no">
						<tr>
							<td height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								<s:property value="#no.count" />
							</td>
							<td height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								${item.userItem.userName}&nbsp;
							</td>
							<td height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								${item.title}&nbsp;
							</td>
							<td height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								${item.absenceCategory.categoryName}&nbsp;
							</td>
							<td height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								<s:date name="#item.startTime" format="yyyy-MM-dd"/>&nbsp;
							</td>
							<td height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								<s:date name="#item.endTime" format="yyyy-MM-dd"/>&nbsp;
							</td>
							<td height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								${item.totalHours}&nbsp;
							</td>
							<td height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								<s:if test="#item.status > 0">审批中</s:if>
								<s:if test="#item.status == 0">已创建</s:if>
								<s:if test="#item.status == -1">成功</s:if>
								<s:if test="#item.status == -2">失败</s:if>
								<s:if test="#item.status == -3">已撤销</s:if>
							</td>
							<td width="80" height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">
								<a href="javascript:void(0);" onclick='location="toShowOrderDetail.action?orderId=${item.orderId}"'>详细 </a> &nbsp;
							</td>
							
						</tr>
					</s:iterator>
					</s:if><s:else>
						<tr><td colspan="10" height="30" align="center" bgcolor="#FFFFFF" class="STYLE19">无记录</td></tr>
					</s:else>
				</tbody>
			</table>
		</div>
		<br/>
		<!--分页导航开始-->
		<div class="STYLE19">
			<s:if test="currpage > 1">
				<a href="javascript:void(0);" onclick="goToPage(${currpage - 1})">上一页</a>
			</s:if>
			<span> 第${currpage }页/共${totalpage}页 </span>
			<s:if test="currpage < totalpage">
				<a href="javascript:void(0);" onclick="goToPage(${currpage + 1})">下一页</a>
			</s:if>
		</div>
		<!--分页导航结束-->	
</body>
</html>